package com.supreme.uploadserver.service;

import com.alibaba.fastjson.JSONObject;
import org.apache.http.NameValuePair;

import java.util.List;
import java.util.Map;

public interface IHttpService<IT> {

    String GET_METHOD = "GET";

    String POST_METHOD = "POST";

    String PUT_METHOD = "PUT";

    String DELETE_METHOD = "DELETE";

    String UPLOAD_METHOD = "UPLOAD";

    IT setMethod(String method);

    IT setUrl(String url);

    IT setEndpoint(String endpoint);

    IT setPath(String path);

    IT setQuery(List<NameValuePair> query);

    IT setQuery(Map<String, String> query);

    IT setQuery(JSONObject query);

    IT setBody(JSONObject body);

    JSONObject request();
}
